﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IPagedList<JLL.China.Model.Admin>>" %>
<div id="table-content-left">
    <div id="pending-post-property-request">
        <!--  start product-table ..................................................................................... -->
        <form id="mainform" class="list_item_form" method="post">
        <input type="hidden" name="redirect" value="admins/index" />
        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
            <tr>
                <th class="table-header-check">
                    <a id="toggle-all"></a>
                </th>
                <th class="table-header-repeat line-left minwidth-1">
                    <a href="">User Name</a>
                </th>
                <th class="table-header-repeat line-left minwidth-1">
                    <a href="">Role</a>
                </th>
                <th class="table-header-repeat line-left">
                    <a href="">Status</a>
                </th>
                <th class="table-header-options line-left">
                    <a href="">Options</a>
                </th>
            </tr>
            <% foreach (var admin in Model)
               { 
            %>
            <tr>
                <td align="center">
                    <input name="selected" id="selected" type="checkbox" value="<%=admin.ID %>" />
                </td>
                <td>
                    <%= admin.UserName %>
                </td>
                <td>
                    <%= admin.Role %>
                </td>
                <td>
                    <%= admin.IsActive ? "Active" : "Inactive" %>
                </td>
                <td class="options-width">
                    <%= Html.ActionLink(" ", "Edit", new { id = admin.ID }, new { @title = "View / Edit", @class = "icon-1 info-tooltip" })%>
                    <%= Html.ActionLink(" ", "Delete", new { id = admin.ID }, new { @title = "Delete", @class = "icon-2 info-tooltip remove-btn" })%>
                    <%= Html.ActionLink(" ", "ChangeStatus", new { id = admin.ID }, new { @title = "Change Status", @class = "icon-3 info-tooltip" })%>
                </td>
            </tr>
            <%} %>
        </table>
        <!--  end product-table................................... -->
        </form>
        <!--  start actions-box ............................................... -->
        <div id="actions-box">
            <a href="" class="action-slider"></a>
            <div id="actions-box-slider">
                <%--<a href="" title="Set selected status to active" class="action-edit action-invoke info-tooltip">
                    Active
                </a>--%> 
                <%= Html.ActionLink("Active", "SelectedUser", new { status = "active" }, new { @title = "Set selected status to active", @class = "action-edit action-invoke info-tooltip" })%>
                <%--<a href="" title="Set selected status to inactive" class="action-edit  action-invoke info-tooltip">
                        Inactive
                 </a> --%>
                  <%= Html.ActionLink("Inactive", "SelectedUser", new { status = "inactive" }, new { @title = "Set selected status to inactive", @class = "action-edit action-invoke info-tooltip" })%>
                <%--<a href="" title="Delete selected" class="action-delete action-invoke info-tooltip">
                    Delete
                </a>--%>
                 <%= Html.ActionLink("Delete", "SelectedUser", new { status = "remove" }, new { @title = "Delete selected", @class = "action-edit  action-invoke-removed icon-2 info-tooltip " })%>
            </div>
            <div class="clear">
            </div>
        </div>
        <!-- end actions-box........... -->
        <!--  start paging..................................................... -->
        <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
            <tr>
                <td class="page-cell">
                    <div class="pager">
                        <%= Html.Pager(ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount) %>
                    </div>
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <%Html.RenderPartial("PerPage", ViewData);%>
                </td>
            </tr>
        </table>
        <!--  end paging................ -->
        <div class="clear">
        </div>
    </div>
    <!-- end pending-post-property-request -->
</div>
